Skip to content

api: executor version check polls up to the delay; multi-instance nodes keep the others' executors - #73

Merged
EnzinoBB merged 3 commits into
masterfrom
fix/executor-start
Oct 22, 2026
Merged

EnzinoBB merged 3 commits into
masterfrom
fix/executor-start

Conversation

@EnzinoBB

Copy link
Copy Markdown
Collaborator

Two non-consensus fixes found while analysing the slowdowns of the scale runs (#72).

Changes

  • Version check (N2). checkExecutorVersion used to sleep executor_check_version_delay (7 s on mainnet, 60 s in CI) on the node's start path and then ask the executor once. It now asks every second with cs::pollUntil and continues as soon as the executor answers.
    • A transport error means the executor is not listening yet, so it is retried. Any other answer is final.
    • When the executor never answers, the outcome is the same as before: it is terminated.
    • A node stop is seen within one second.
    • The check stays on the launching thread on purpose: two threads opening the shared transport would be a new risk.
    • The log line now says how long the answer took.
  • Stop (N1). Executor::stop() used to kill every contract-executor JVM on the machine (via jps). With executor_multi_instance set, it now terminates only its own executor, as checkAnotherExecutor already does at start. The default keeps the official behaviour.

Nothing here is consensus-relevant. The plan and the lifecycle analysis come from Fable: the watcher thread cannot relaunch the JVM during the check, because at start it does not exist yet and on a relaunch it is the thread running the check.

Tests

tests/csnode/polluntil_tests.cpp: first success, last attempt at the deadline, early stop, zero delay.

Validation

  • Build and unit tests.
  • Testnet with contracts=1: the "answered after N ms" lines, and executor relaunches in the sampler.
  • Robustness: contracts-crash, contracts-power-cut, contracts-pruned-term-kill.
  • A scale run at 33 and 51 nodes.

🤖 Generated with Claude Code

EnzinoBB and others added 3 commits October 22, 2026 22:45
…es keep the others' executors

- checkExecutorVersion slept executor_check_version_delay (7 s on mainnet, 60 s in CI) on the
  node's start path and then asked once: it now asks every second (cs::pollUntil) and goes on as
  soon as the executor answers, with the same outcome as before when it never does (terminated);
  a transport error means not listening yet and is retried, any other answer is final; a stop is
  seen within a second. It stays on the launching thread (two threads opening the shared
  transport would be the new risk). The log line says how long the answer took.
- Executor::stop() killed every contract-executor JVM of the machine (jps): with
  executor_multi_instance it now terminates only its own, as checkAnotherExecutor already does at
  start. The default keeps the official behaviour.

Nothing here touches consensus. Found in the scale runs: every node start waited the full delay,
and every restart test relaunched all the executors of the machine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…'s answer in the version check

getExecutorBuildVersion closes the connection on every exception, so 'still connected' never told
an answer from a transport failure: it now sets ThriftException for a transport error (as execute()
does), the poll retries only that, and the log says whether the executor never answered or answered
with an error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@EnzinoBB
EnzinoBB merged commit 1366c52 into master Oct 22, 2026
3 checks passed
EnzinoBB added a commit that referenced this pull request Oct 22, 2026
…ter #73

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant